package com.bwie.controller;


import com.bwie.service.TbStudentService;
import com.bwie.utils.R;
import com.bwie.vo.StudentPageVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @projectName: school2211a
 * @package: com.bwie.controller
 * @className: IndexController
 * @author: 杨珂
 * @description: TODO
 * @date: 2025/6/21 10:55
 * @version: 1.0
 */
@RestController
@RequestMapping("/student/index")
public class IndexController {


    @Autowired
    TbStudentService tbStudentService;


    /**
     * @param studentPageVo:
     * @return R
     * @author :杨珂
     * @description 分页获取列表
     * @date 2025/6/25 8:12
     */
    @PostMapping("/getStudentList")
    public R getStudentList(@RequestBody StudentPageVo studentPageVo) {
        return tbStudentService.getStudentList(studentPageVo);
    }


    /**
     * @param :
     * @return R
     * @author :杨珂
     * @description 获取教师列表
     * @date 2025/6/25 8:14
     */
    @PostMapping("/getClazzList")
    public R getClazzList() {
        return tbStudentService.getClazzList();
    }


}
